Smart Buttons

Building Scripts

After you open the Smart Buttons Editor, there are three ways to build a script using XML elements (controls):

The scripts use XML (Extensible Markup Language), which is a markup language similar to HTML, but without predefined tags.

 

Build 1: Using XML Generators

Most Smart Buttons controls have XML Generators that provide an intuitive dialog box to create scripts in XML.

To use the XML Generator:
  1. Click on a blue controls/XML button on the left side of the Smart Buttons Editor to display the XML Generator. In this example, a Text Field (TextBox XML element) is generated.

  2. Complete the fields in the XML Generator.

  3. Click SUBMIT to generate the XML for the data entered.

 

Build 2: Dragging and Dropping Control Buttons

You can drag and drop a Control button to automatically add the code of the selected control.

You can then add values of attributes which you want to use within that control:

Build 3: Writing Code

You can write XML code for a control directly in the Smart Buttons Editor.

Adding Elements

Each XML element starts with Less Than tag <. When you enter < in the Smart Buttons Editor, a list of all available XML elements is displayed.

Select an element to add to the Smart Buttons editor:

Go to the inside of the XML element to see a list of all attributes within that element:

Select one of the attributes (red), to add to the Smart Buttons Editor. Then, enter the value of the attribute (blue).

Basic Script Structure

A script always contains a root element ButtonConf. This XML element is the root of the script, and is added to Smart Buttons Editor by default. All other XML elements must be contained between the opening <ButtonConf> and closing </ButtonConf> tags.

As a body (value) of the ButtonConf XML element, you can add either one or many XML elements, depending on the purpose of the script.

In the example above, there is only one XML element : RunCommand. However, the following script contains many XML elements, including QuestionsBlock, TextBox, and DatePicker.